@ECHO OFF

@ECHO This script builds the project in Release configuration to the bin directory

REM clear bin folder by removing and recreation
IF NOT EXIST ..\bin\nul GOTO notExists
RD /q /s ..\bin
:notExists
MD ..\bin

call build_one_project.bat Themis
..\Tools\ilmerge /out:..\bin\Themis.dll /keyfile:Themis.snk ..\bin\Themis\Themis.dll
RD /q /s ..\bin\Themis

call build_one_project.bat Themis.NHibernate
..\Tools\ilmerge /out:..\bin\Themis.NHibernate.dll /keyfile:Themis.snk ..\bin\Themis.NHibernate\Themis.dll ..\bin\Themis.NHibernate\Themis.NHibernate.dll
RD /q /s ..\bin\Themis.NHibernate

COPY Read_me.txt ..\bin\Read_me.txt